package com.spzx.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spzx.product.domain.SkuStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SkuStockMapper extends BaseMapper<SkuStock> {

	SkuStock checkStock(@Param("skuId") Long skuId, @Param("skuNum") Integer skuNum);

	int lockStock(@Param("skuId") Long skuId, @Param("skuNum") Integer skuNum);

	int unLockStock(@Param("skuId") Long skuId, @Param("skuNum") Integer skuNum);

	int minusStock(@Param("skuId") Long skuId, @Param("skuNum")Integer skuNum);
}
